home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- set HC to the number of cast "handCursor"
- cursor([HC, HC + 1])
- put EMPTY into field "pattern"
- end
-
- on playPattern
- put random(4) after field "pattern"
- put EMPTY into field "userEntry"
- repeat with i = 1 to the number of chars in field "pattern"
- set light to char i of field "pattern"
- set the castNum of sprite 2 to the number of cast "all on" + light
- puppetSound(the name of cast (the number of cast "Piano C" + light - 1))
- updateStage()
- wait(20)
- set the castNum of sprite 2 to the number of cast "all off"
- updateStage()
- wait(10)
- end repeat
- end
-
- on wait ticks
- set temp to the timer
- repeat while (the timer - temp) < ticks
- end repeat
- end
-
- on playLight num
- set the castNum of sprite 2 to the number of cast "all on" + num
- puppetSound(the name of cast (the number of cast "Piano C" + num - 1))
- updateStage()
- wait(20)
- set the castNum of sprite 2 to the number of cast "all off"
- updateStage()
- put num after field "userEntry"
- testEntry()
- end
-
- on testEntry
- if field "userEntry" = field "pattern" then
- if the number of chars in field "userEntry" = 10 then
- puppetSound(0)
- go("win")
- else
- wait(60)
- go(1)
- end if
- else
- if not (field "pattern" starts field "userEntry") then
- puppetSound("buzz")
- go("lose")
- end if
- end if
- end
-